
$screen-sm-min: 576px;
$screen-md-min: 768px;
$screen-lg-min: 992px;
$screen-xl-min: 1200px;

$screen-sm-max: $screen-sm-min - 1px;
$screen-md-max: $screen-md-min - 1px;
$screen-lg-max: $screen-lg-min - 1px;
$screen-xl-max: $screen-xl-min - 1px;


@mixin area($args...){
  @if(length($args) == 1){
    width: nth($args, 1);
    height: nth($args, 1);
  }@else if(length($args) == 2){
    width: nth($args, 1);
    height: nth($args, 2);
  }
}

@mixin lhh($h) {
  height: $h;
  line-height: $h;
}


@function ls($val,$lh1,$fs1,$lh2,$fs2){
  @return $val - (($lh1 - $fs1) / 2 + ($lh2 - $fs2) / 2)
}

@function els($val,$lh,$fs){
  @return $val - ($lh - $fs) / 2
}

@mixin bg-c-c{
  background: center/cover;
}

@mixin ellipsis{
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}


//导航跟随效果
@mixin nav-item-ah {
  @for $i from 1 through 7 {
    .nav-item{
      &.active:nth-child(#{$i}) ~ &:last-child {
        transform: translateX(100% * ($i - 1))
      }
      &:hover:nth-child(#{$i}) ~ &:last-child:nth-last-child(1) {
        transform: translateX(100% * ($i - 1))
      }
    }
  }
}